echo off
if "%2" == "" goto directions

saxon master.%2 getStage.xsl stageName=%1 > %1.%2
echo %1.%2 created.
goto end

:directions
echo Enter
echo 
echo   getStage stageName xsd
echo 
echo to extract a W3C schema of stage stageName from master.xsd into stageName.xsd.
echo Enter rng instead of xsd to extract it from master.rng into stageName.rng.

:end